package com.yycx.module.bus.client.entity.hy;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import com.yycx.common.mybatis.base.entity.AbstractEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.yycx.common.mybatis.annotation.TableAlias;
/**
 * 回款明细
 *
 * @author flyme
 * @date 2023-11-23
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("bus_hyorder_return")
@TableAlias("bhr")
@ApiModel(value="BusHyorderReturn对象", description="回款明细")
public class BusHyorderReturn extends AbstractEntity {

private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "orderDetailsReturnId", type = IdType.ASSIGN_ID)
    private Long orderDetailsReturnId;

    @ApiModelProperty(value = "订单明细ID")
    private String orderDetailsId;

    @ApiModelProperty(value = "订单Id")
    private String orderId;

    @ApiModelProperty(value = "父ID")
    private String parentId;

    @ApiModelProperty(value = "部门")
    private Long deptId;

    @ApiModelProperty(value = "区域ID")
    private Long areaId;

    @ApiModelProperty(value = "客户编号")
    private String customCode;

    @ApiModelProperty(value = "客户ID")
    private Long customId;

    @ApiModelProperty(value = "业务员ID")
    private Long saleManId;

    @ApiModelProperty(value = "业务员唯一编码")
    private String saleManCode;

    @ApiModelProperty(value = "渠道商ID")
    private Long saleManIdF;

    @ApiModelProperty(value = "片区服务商ID")
    private Long saleManIdC;

    @ApiModelProperty(value = "商务经理ID")
    private Long saleManIdD;

    @ApiModelProperty(value = "商务总负责人ID")
    private Long saleManIdE;

    @ApiModelProperty(value = "部门总监ID")
    private Long deptManagerId;

    @ApiModelProperty(value = "企业ID")
    private Long companyId;

    @ApiModelProperty(value = "身份编码")
    private String orderCode;

    @ApiModelProperty(value = "商品表ID")
    private Long drugsId;

    @ApiModelProperty(value = "商品编号")
    private String drugNo;

    private String drugJr;

    @ApiModelProperty(value = "结算政策ID")
    private Long policyDrugId;

    @ApiModelProperty(value = "库存编号")
    private Integer drugLotId;

    @ApiModelProperty(value = "商品名称")
    private String drugsName;

    @ApiModelProperty(value = "生产企业")
    private String producersName;

    @ApiModelProperty(value = "商品类型")
    private String drugType;

    @ApiModelProperty(value = "规格")
    private String drugsSpec;

    @ApiModelProperty(value = "批号")
    private String drugLotNo;


    @ApiModelProperty(value = "发货年份")
    private Integer sendYear;

    @ApiModelProperty(value = "发货月份")
    private Integer sendMonth;

    @ApiModelProperty(value = "发货日期(天)")
    private Integer sendDay;


    @ApiModelProperty(value = "是否回款结算")
    private Integer settleRule;

    @ApiModelProperty(value = "是否包票")
    private Integer baopiao;

    @ApiModelProperty(value = "销售类型")
    private String saleType;

    @ApiModelProperty(value = "发货方式")
    private Integer sendType;

    @ApiModelProperty(value = "数量")
    private BigDecimal saleNum;

    @ApiModelProperty(value = "销售价格")
    private BigDecimal salePrice;

    @ApiModelProperty(value = "销售金额(发货金额)")
    private BigDecimal saleAmount;

    @ApiModelProperty(value = "成本价格")
    private BigDecimal costPrice;

    @ApiModelProperty(value = "成本金额")
    private BigDecimal costAmount;

    @ApiModelProperty(value = "底价方式1：按结算价 2:按成本价")
    private Integer floorPriceType;

    @ApiModelProperty(value = "票折金额")
    private BigDecimal discountPrice;

    @ApiModelProperty(value = "底价公式")
    private String customFloorAmountFormula;



    @ApiModelProperty(value = "资保金金额")
    private BigDecimal customBond;

    @ApiModelProperty(value = "保证金状态")
    private Integer customBondState;

    @ApiModelProperty(value = "资保金收款银行")
    private String customBondBankName;

    @ApiModelProperty(value = "资保金收款金额")
    private BigDecimal customBondTakeAmount;

    @ApiModelProperty(value = "资保金收款日期")
    private Date customBondDate;

    @ApiModelProperty(value = "结算发货金额")
    private BigDecimal settleSendAmount;

    @ApiModelProperty(value = "底价")
    private BigDecimal customFloorAmount;

    @ApiModelProperty(value = "高开税金(销售单价-市场结算价)*数量*(市场结算标准)")
    private BigDecimal customGapUpAmount;


    @ApiModelProperty(value = "渠道商结算价")
    private BigDecimal settlePrice;

    @ApiModelProperty(value = "渠道商超期结算价")
    private BigDecimal settleOverPrice;

    @ApiModelProperty(value = "渠道商超期天数")
    private Integer settleOverDay;

    @ApiModelProperty(value = "超期差额")
    private BigDecimal overDateAmount;

    @ApiModelProperty(value = "片区服务商结算价")
    private BigDecimal settlePriceC;

    @ApiModelProperty(value = "商务经理结算价")
    private BigDecimal settlePriceD;

    @ApiModelProperty(value = "商务总负责人结算价")
    private BigDecimal settlePriceE;

    @ApiModelProperty(value = "渠道商结算费率")
    private BigDecimal settleRate;

    @ApiModelProperty(value = "渠道商结费率")
    private BigDecimal settleRateC;

    @ApiModelProperty(value = "商务经理结算费率")
    private BigDecimal settleRateD;

    @ApiModelProperty(value = "商务总负责人结算费率")
    private BigDecimal settleRateE;

    @ApiModelProperty(value = "渠道商应结算金额")
    private BigDecimal settleAmount;

    /**
     * 渠道商结算每盒提成单价
     */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private BigDecimal rebateAmount;

    /**
     * 渠道商结算提成金额
     */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private BigDecimal settleRebateAmount;

    @ApiModelProperty(value = "片区服务商结算金额")
    private BigDecimal settleAmountC;

    @ApiModelProperty(value = "商务经理结算金额")
    private BigDecimal settleAmountD;

    @ApiModelProperty(value = "商务总负责人结算金额")
    private BigDecimal settleAmountE;

    /**
     * 结算费用申请ID
     */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Long settleFeeId;

    /**
     * 部门结算结算申请ID
     */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Long deptSettleApplyId;

    /**
     * 结算申请ID
     */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Long settleApplyId;



    /**
     * 片区服务商结算申请ID
     */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Long settleApplyIdC;
    /**
     * 商务经理结算申请ID
     */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Long settleApplyIdD;
    /**
     * 商务总负责人结算申请ID
     */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Long settleApplyIdE;

    @ApiModelProperty(value = "渠道商结算公式")
    private String settleFormulaContent;

    @ApiModelProperty(value = "片区服务商结算公式")
    private String settleFormulaContentC;

    @ApiModelProperty(value = "商务经理结算公式")
    private String settleFormulaContentD;

    @ApiModelProperty(value = "商务总负责人结算公式")
    private String settleFormulaContentE;

    @ApiModelProperty(value = "部门结算价")
    private BigDecimal deptPrice;

    @ApiModelProperty(value = "部门结算金额")
    private BigDecimal deptSettleAmount;

    @ApiModelProperty(value = "部门超期金额")
    private BigDecimal deptSettleOverAmount;

    @ApiModelProperty(value = "部门结算支付状态(0:未支付,1:已支付)")
    private Integer deptSettleState;

    @ApiModelProperty(value = "部门结算税率 ")
    private BigDecimal deptRate;

    @ApiModelProperty(value = "部门结算公式")
    private String deptSettleFormula;

    @ApiModelProperty(value = "部门利润")
    private BigDecimal deptProfitAmount;

    @ApiModelProperty(value = "部门利润公式")
    private String deptProfitAmountFormula;

    @ApiModelProperty(value = "利润")
    private BigDecimal profitAmount;

    @ApiModelProperty(value = "税收利润")
    private BigDecimal taxProfitAmount;

    @ApiModelProperty(value = "回款方式1 全款 2 预收款 3 资信")
    private Integer returnType;

    @ApiModelProperty(value = "回款金额")
    private BigDecimal returnAmount;

    @ApiModelProperty(value = "回款日期")
    private Date returnDate;

    @ApiModelProperty(value = "认款日期")
    private Date renDate;

    @ApiModelProperty(value = "回款银行")
    private String returnBank;

    @ApiModelProperty(value = "回款单号")
    private String returnNo;

    @ApiModelProperty(value = "回款单ID")
    private Long returnId;

    @ApiModelProperty(value = "回款状态(0:未认款,1:已认款)")
    private Integer customReturnState;


    @ApiModelProperty(value = "利润公式")
    private Long profitAmountFormulaId;

    @ApiModelProperty(value = "利润公式内容")
    private String profitAmountFormulaContent;

    @ApiModelProperty(value = "税率差额")
    private BigDecimal taxRateDiff;

    @ApiModelProperty(value = "税率差公式")
    private String taxRateDiffFormula;



    @ApiModelProperty(value = "超标准差额")
    private BigDecimal overStandAmount;

    @ApiModelProperty(value = "产品利润")
    private BigDecimal drugProfitAmount;

    @ApiModelProperty(value = "边际利润")
    private BigDecimal bjProfitAmount;

    @ApiModelProperty(value = "管理利润")
    private BigDecimal manageProfitAmount;


    @ApiModelProperty(value = "预提税金")
    private BigDecimal ytTaxAmount;

    @ApiModelProperty(value = "校验金额")
    private BigDecimal checkAmount;

    @ApiModelProperty(value = "支付开票税金(预估)")
    private BigDecimal payInvoiceTaxAmount;

    @ApiModelProperty(value = "状态")
    private Integer orderDetailsState;

    @ApiModelProperty(value = "核算状态")
    private Integer calculateState;

    @ApiModelProperty(value = "拆分比例")
    private BigDecimal radio;

}
